package com.syy.api.system.impl;

import com.syy.api.system.dto.DeptRespDTO;
import com.syy.api.system.service.DeptApi;
import com.syy.api.system.service.DeptService;
import com.syy.common.core.domain.entity.SysDept;
import com.syy.system.sms.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

@Service
public class DeptApiImpl implements DeptApi {

    @Resource
    private DeptService deptService;

    @Override
    public DeptRespDTO getDept(Long id) {
        SysDept dept = deptService.getDept(id);
        return BeanUtils.toBean(dept, DeptRespDTO.class);
    }

    @Override
    public void validateDeptList(Collection<Long> ids) {
        deptService.validateDeptList(ids);
    }

    @Override
    public List<DeptRespDTO> getDeptList(Collection<Long> ids) {
        return Collections.emptyList();
    }

}